package com.jhd.fuzhou.util;

import java.math.BigDecimal;

public class CompareFloat {

    public static boolean compareFloat(float a,float b,float c) {//a为比较的最小值，b为比较最大值，c为需要比较的值
        BigDecimal a1 = new BigDecimal(a);
        BigDecimal b1 = new BigDecimal(b);
        BigDecimal c1 = new BigDecimal(c);
        if (c1.compareTo(a1)>=0&&b1.compareTo(c1)>=0) {
            return true;
        }
        return false;
    }
}
